<?php
//-- La cabecera -->
include('include/headUP.inc');

if (!$usuarioSesion){
    header("Location: index.php");
}

include('include/cabecera.inc');
?>

			<!-- Columna dinamico -->
			<div class="content_dinamyc" id="content_dinamyc">
                <div id="resultSearch" class="blockDinamic">
<?php

                    $tit = $_POST['titulo'];
                    $fnac = $_POST['fecha'];
                    list($d, $m, $y) = explode('/',$fnac);
                    $fnac = $y."-".$m."-".$d;
                    $pais = $_POST['pais'];
                    $desc = $_POST['descripcion'];
                    $idus = getIdUser($usuarioSesion);
                    $sent = "INSERT INTO albumes VALUES (NULL,'$tit','$desc','$fnac','$pais','$idus')";
                    echo $sent;
                    if (sqlSentencia($sent)){
                        echo "<p>Album insertada correctamente.</p>";
                        echo "<a href='crearAlbum.php'>Continuar</a> ";
                    }else{
                        echo "<p class='error'>Error intenelo de nuevo.</p>";
                        echo "<a href='crearAlbum.php'>Volver a intentar</a> ";
                    }
                    ?>
                </div>
            </div>

            <!-- Columna estatica -->
            <?php
            include('include/panelSide.inc');

include('include/footerDown.inc');
?>